﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.Products>" %>
<%@ Import Namespace="CRM.Database.Model" %>



<%
    
   //  var col = new ProductsCollection();
    
    Html.DevExpress().ComboBox(s =>
                                    {

                                        s.Name = "IdProduct";
                                        s.Properties.ValueType = typeof (int);
                                        s.Properties.ValueField = "IdProduct";
                                        s.Properties.TextField = "ArticleLong";
                                        s.Properties.EnableCallbackMode = true;
                                        s.Properties.CallbackPageSize = 20;
                                       s.Width = new Unit(300);
                                        s.Properties.IncrementalFilteringMode = IncrementalFilteringMode.Contains;
                                        s.CallbackRouteValues = new { Action = "ProductCallback", Controller = "Contracts", idProduct=Model.IdProduct };
                                        //s.Properties.ClientSideEvents.BeginCallback = "function(s, e) { e.customArgs['Region'] = IdRegion.GetValue(); }";
                                    }).BindList(DB.Products).Bind(Model.IdProduct).GetHtml();%>

